package engine.loader;

import engine.render.SoundBuffer;
import java.util.HashMap;

public class LoaderSound
{
    
    private HashMap<String, SoundBuffer> soundBufferMap;
    
    public LoaderSound()
    {
        this.soundBufferMap = new HashMap<>();
    }
    
    public void loadSoundWAV(String fileName)
    {
        SoundBuffer sound = new SoundBuffer(fileName);
        this.soundBufferMap.put(fileName, sound);
    }
    
    public SoundBuffer getSoundWAV(String fileName)
    {
        SoundBuffer sound = this.soundBufferMap.get(fileName);
        return sound;
    }
    
    public void destroy()
    {
        this.soundBufferMap.clear();
        this.soundBufferMap = null;
    }
    
}
